import 'package:flutter/material.dart';

class ImageCase extends StatelessWidget {
  const ImageCase({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity, // 宽度
      height: double.infinity, // 高度
      color: Colors.red, // 背景色
      alignment: Alignment.center,
      child: SizedBox(
        width: 300,
        height: 300,
        child: Image.network(
            "https://img0.baidu.com/it/u=3765698572,4158256791&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=889",
            width: double.infinity,
            height: double.infinity,
            fit: BoxFit.cover),
      ),
    );
  }
}
